function apply(fn, obj, args){
    if(obj === undefined || obj === null){
        obj = globalThis;
    }

    obj.temp = fn;

    const result = obj.temp(...args);

    delete obj.temp;

    return result;
}